from django.contrib import admin
from models import *

# Register your models here.

class BlogAdmin(admin.ModelAdmin):
    list_display = ('title','timestamp','author','blogtype','clicktime',)
    
class TypeAdmin(admin.ModelAdmin):
    list_display = ('type',)
    
class ProfileAdmin(admin.ModelAdmin):
    list_display = ('name','qq', 'email')
    
class CommentAdmin(admin.ModelAdmin):
    list_display = ('blog','content')
    
class TravelInfoAdmin(admin.ModelAdmin):
    list_display = ('author', 'title', 'timestamp', 'clicktime', 'like')

class TravelAdmin(admin.ModelAdmin):
    list_display = ('body','pic')
    
class PicInfoAdmin(admin.ModelAdmin):
    list_display = ('author', 'title', 'timestamp', 'clicktime', 'first_pic')
    
class PicAdmin(admin.ModelAdmin):
    list_display = ('picinfo','pic')

class XysyAdmin(admin.ModelAdmin):
    list_display = ('author','timestamp')

class LeaveAMsgAdmin(admin.ModelAdmin):
    list_display = ('timestamp', 'content')
    
class PicCommentAdmin(admin.ModelAdmin):
    list_display = ('picInfo', 'timestamp')
    
admin.site.register(Blog, BlogAdmin)
admin.site.register(Type, TypeAdmin)
admin.site.register(Profile, ProfileAdmin)
admin.site.register(Comment, CommentAdmin)
admin.site.register(TravelInfo, TravelInfoAdmin)
admin.site.register(Travel, TravelAdmin)
admin.site.register(PicInfo, PicInfoAdmin)
admin.site.register(Pic, PicAdmin)
admin.site.register(Xysy, XysyAdmin)
admin.site.register(LeaveAMsg, LeaveAMsgAdmin)
admin.site.register(PicComment, PicCommentAdmin)